package com.itheima.common.domain;

import lombok.Setter;

@Setter
public class PageReqDto {
    protected Integer size = 10;
    protected Integer page = 1;

    public Integer getSize() {
        if (this.size == null || this.size <= 0 || this.size > 100) {
            setSize(10);
        }
        return size;
    }

    public Integer getPage() {
        if (this.page == null || this.page <= 0) {
            setPage(1);
        }
        return page;
    }
}